
<div class="eject_con">
    <div id="warning"></div>
    <form id="fsedit_form" action="<?php echo url('circle/manage/friendship_edit');?>?c_id=<?php echo $c_id;?>&fs_id=<?php echo $fs_id;?>" method="post" class="base-form-style">
        <input type="hidden" value="ok" name="form_submit">
        <dl>
            <dt>圈子名称：</dt>
            <dd> <?php echo $friendship_info['friendship_name'];?> </dd>
        </dl>
        <dl>
                <dt>圈子排序：</dt>
            <dd>
                <input type="text" name="sort" class="w50 text" value="<?php echo $friendship_info['friendship_sort'];?>" />
            </dd>
        </dl>
        <dl>
            <dt>显示状态：</dt>
            <dd>
                <input type="radio" name="status" value="1" <?php if($friendship_info['friendship_status'] == 1){?>checked="checked"<?php }?> />
                显示&nbsp;
                <input type="radio" name="status" value="0" <?php if($friendship_info['friendship_status'] == 0){?>checked="checked"<?php }?> />
                隐藏 </dd>
        </dl>
        <dl class="bottom">
            <dt>&nbsp;</dt>
            <dd><a class="submit-btn" nctype="submit-btn" href="Javascript: void(0)">提交</a></dd>
        </dl>
    </form>
</div>
<script type="text/javascript">
    var c_id = <?php echo $c_id;?>;
    var fs_id = <?php echo $fs_id;?>;
    $(function(){
        $('a[nctype="submit-btn"]').click(function(){
            $('#fsedit_form').submit();
        });
        $('#fsedit_form').validate({
            errorLabelContainer: $('#warning'),
            invalidHandler: function(form, validator) {
                $('#warning').show();
            },
            submitHandler:function(form){
                ajaxpost('fsedit_form', "<?php echo url('circle/manage/friendship_edit');?>?c_id="+c_id+"$fs_id="+fs_id, '', 'onerror');
            },
            rules : {
                sort : {
                    required : true,
                    digits : true,
                    max : 255
                }
            },
            messages : {
                sort  : {
                    required : '请填写友情圈子排序',
                    digits : '请填写数字',
                    max : '数值不能超过255'
                }
            }
        });
    });
</script>